import { ref } from 'vue';
import { getSystemConfig } from '@/api/common';
import { config } from '@/assets/js/config';
export function useIosPay() {
    //是否可支付
    const iosPayFlag = ref(false);
    const getIosPayFlag = async () => {
        console.log(config);
        if (uni.getSystemInfoSync().platform == 'ios') {
            let [result, err] = await getSystemConfig({ key: `${config.targetLang}_ios_pay_flag` });
            if (result) {
                iosPayFlag.value = result.val === 'true' ? true : false;
            }
        } else {
            iosPayFlag.value = true;
        }
    };

    return { iosPayFlag, getIosPayFlag };
}
